import os
import sys


class Resources:
    @staticmethod
    def GetFilePath(fileName):
        if getattr(sys, 'frozen', False):
            base_dir = sys._MEIPASS  # PyInstaller 临时解压目录
        else:
            base_dir = os.path.dirname(os.path.dirname(__file__))
        #base_dir = getattr(sys, '_MEIPASS', os.path.dirname(os.path.abspath(__file__)))
        return os.path.join(base_dir, fileName)
